package com.own.component.common.model;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * ItemCountModel
 *
 * @author chenxueli
 * @date 2023-11-13 18:10:00
 */
@Data
@NoArgsConstructor
public class ItemCountModel implements Serializable {

    /**
     * 名称
     */
    private String name;

    /**
     * 数量
     */
    private Integer count;

    public ItemCountModel(String name, Integer count) {
        this.name = name;
        this.count = count;
    }

    public ItemCountModel(String name, Long count) {
        this.name = name;
        this.count = count.intValue();
    }

    public ItemCountModel(String name, int count) {
        this.name = name;
        this.count = count;
    }

    public ItemCountModel(String name, long count) {
        this.name = name;
        this.count = (int) count;
    }

}
